import React from 'react';
import Home from './pages/Home'
import Login from './pages/Login'
import Register from './pages/Register'
import Error from './pages/Error'
import Detail from './pages/Detail'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
class App extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      data1: 1
    }
  }


  render() {
    return (

      <div  >
        <BrowserRouter>
          <Switch>
            <Route exact path='/' component={Home}></Route>
            <Route path='/login' component={Login}></Route>
            <Route path='/register' component={Register}></Route>
            <Route path='/detail/:touristid' component={Detail}></Route>
            {/* <Route path='/detail' component={Detail}></Route> */}
            <Route  component={Error}></Route>
          </Switch>

        </BrowserRouter>

      </div>



    )


  }




}








export default App;
